import request from '@/utils/request'

// 查询机会分类列表
export function listOpportunityCategory(query) {
  return request({
    url: '/backend/opportunityCategory/list',
    method: 'get',
    params: query
  })
}

// 查询机会分类详细
export function getOpportunityCategory(categoryId) {
  return request({
    url: '/backend/opportunityCategory/' + categoryId,
    method: 'get'
  })
}

// 新增机会分类
export function addOpportunityCategory(data) {
  return request({
    url: '/backend/opportunityCategory',
    method: 'post',
    data: data
  })
}

// 修改机会分类
export function updateOpportunityCategory(data) {
  return request({
    url: '/backend/opportunityCategory',
    method: 'put',
    data: data
  })
}

// 删除机会分类
export function delOpportunityCategory(categoryId) {
  return request({
    url: '/backend/opportunityCategory/' + categoryId,
    method: 'delete'
  })
}
